package hupu.hnlp.hot_buffer.distbuffer.appconfig;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import hupu.hnlp.hot_buffer.distbuffer.appconfig.db.Db;
import hupu.hnlp.hot_buffer.distbuffer.appconfig.http.Http;
import hupu.hnlp.hot_buffer.distbuffer.appconfig.rmi.Rmi;
import hupu.hnlp.hot_buffer.distbuffer.appconfig.storage.Storage;

@Configuration("appconfig")
public class AppConfig
{
    @Value("${spring.profiles.active}")
    public String env;

    @Resource(name = "appconfig.rmi")
    public Rmi rmi;

    @Resource(name = "appconfig.storage")
    public Storage storage;

    @Resource(name = "appconfig.db")
    public Db db;

    @Resource(name = "appconfig.http")
    public Http http;

    public Rmi getRmi()
    {
        return rmi;
    }

    public void setRmi(Rmi rmi)
    {
        this.rmi = rmi;
    }

    public Storage getStorage()
    {
        return storage;
    }

    public void setStorage(Storage storage)
    {
        this.storage = storage;
    }

    public Db getDb()
    {
        return db;
    }

    public void setDb(Db db)
    {
        this.db = db;
    }

    public String getEnv()
    {
        return env;
    }

    public void setEnv(String env)
    {
        this.env = env;
    }

    public Http getHttp()
    {
        return http;
    }

    public void setHttp(Http http)
    {
        this.http = http;
    }

}
